<template>
  <div>
    <h1>computed的使用</h1>
    <p>分数：{{ scoreList }}</p>
    <p>优秀：{{ betterList }}</p>
  </div>
</template>

<script setup>
import { ref, computed } from "vue";
const scoreList = ref([80, 100, 90, 70, 60]);

// const betterList = computed(() => {
//   return scoreList.value.filter((item) => item >= 90);
// });

const betterList = computed(() => scoreList.value.filter((item) => item >= 90));
</script>

<style lang="scss" scoped>
</style>